//
//  ViewController.m
//  TestDemo
//
//  Created by 张润东 on 2021/3/4.
//

#import "ViewController.h"
#import <CHNMarcos/MacroDefinition.h>
#import "SpecialViewController.h"
@interface ViewController ()
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self makeUI];
    // Do any additional setup after loading the view.
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
//    [self.navigationController setNavigationBarHidden:YES animated:NO];
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
//    [self.navigationController setNavigationBarHidden:NO animated:NO];
}

-(void)makeUI{
    self.navigationItem.title = @"你好";
    self.view.backgroundColor = Gray_BackgroundColor();
    UIButton *btn = [UIButton new];
    btn.frame =CGRectMake(SafeArea_Height(), NAV_HEIGHT, SmtSize(100), SmtSize(120));
    [btn setTitleColor:Title_Color() forState:UIControlStateNormal];
    [btn setTitleColor:Comment_Color() forState:UIControlStateHighlighted];
    [self.view addSubview:btn];
    [btn.titleLabel setFont:SmtCustomFont(22, UIFontWeightMedium)];
    [btn setTitle:@"你好啊" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(nextView) forControlEvents:UIControlEventTouchUpInside];
}

-(void)nextView{
    SpecialViewController *vc =  [[SpecialViewController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}


@end
